import { defineStore } from "pinia";
import { cancelConsultOrderAPI, deleteOrderAPI } from "@/api/consultRecordApi.ts";


const useConsultRecordStore = defineStore("consultRecordStore", () => {

    /*取消问诊订单的请求函数*/
    const cancelConsultOrder = async (id: string): Promise<void> => {
        await cancelConsultOrderAPI(id);
    };

    /*删除问诊订单的请求函数*/
    const deleteConsultOrder = async (id: string): Promise<void> => {
        await deleteOrderAPI(id);
    };

    return {
        cancelConsultOrder,
        deleteConsultOrder
    };

});

export default useConsultRecordStore;
